﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CrossLayerCommunication;
using ExampleWebApplication.DAL;
using ExampleWebApplication.Messages;
using ExampleWebApplication.Models;

namespace ExampleWebApplication.BLL
{
    public static class UserService
    {
        public static IOperationResult LogInUser(User user)
        {
            var isUserValid = user.Validate();

            if (!isUserValid.WasSuccessful)
                return isUserValid;

            return new Storage().EditUser(user);
        }
    }
}